// opencv async detector demo
// Author: lihaoweicv@hotmail.com
// MIT License

#ifndef CV_ASYNC_DEMO_STATUS_H
#define CV_ASYNC_DEMO_STATUS_H

#include "macro.h"
#include <string>

namespace  cvf
{
    enum StatusCode
    {
        Status_OK = 0x00,
        Status_PARAM_ERR = 0x01,//< 参数错误
        Status_FRAME_DATA_INVALID = 0x02,//< 帧数据错误
        Status_INIT_MODEL_ERR = 0x03,//< 初始化模型错误
        Status_SUBMIT_JOB_BUSY = 0x04, //<子任务提交忙碌
        //补充更多的状态码
    };

    class PUBLIC Status
    {
    public:
            ~Status();
            Status(int code = Status_OK, std::string message = "OK");

            Status &operator=(int code);

            bool operator==(int code_);
            bool operator!=(int code_);
            explicit  operator int();
            explicit  operator bool();
            std::string description();

            private:
            int code_ = 0;
            std::string message_;
    };

}//namespace  cvf

#endif //CV_ASYNC_DEMO_STATUS_H
